<!-- 回款详情 -->
<template>
  <el-drawer v-model="drawerVisible" :close-on-click-modal="false" :destroy-on-close="true" size="1000px" title="回款详情">
    <el-form label-position="top" require-asterisk-position="right" :inline="true" class="form-detail">
      <div class="p-title mb-12">回款信息</div>
      <div class="form-inline-wrap">
        <el-form-item label="合同编号">HT202404031200</el-form-item>
        <el-form-item label="合同名称">中科商标注册合同</el-form-item>
        <el-form-item label="款项名称">合同首款</el-form-item>
        <el-form-item label="回款金额(元)">8800.00</el-form-item>
        <el-form-item label="回款日期">2024-06-10</el-form-item>
        <el-form-item label="收款账户">000601531320386681</el-form-item>
        <el-form-item label="提交时间">2024-06-10 09:29</el-form-item>
        <el-form-item label="回款凭证">
          <file-image :url="params.url"></file-image>
        </el-form-item>
      </div>
      <div class="p-title mb-12">核实信息</div>
      <div class="form-inline-wrap">
        <el-form-item label="核实状态">
          <el-tag type="danger">已拒绝</el-tag>
        </el-form-item>
        <el-form-item label="核实人">财务主管</el-form-item>
        <el-form-item label="核实时间">2024-06-10 09:29</el-form-item>
        <el-form-item label="拒绝原因">回款金额有误</el-form-item>
      </div>
    </el-form>
    <template #footer>
      <el-button @click="drawerVisible = false">取消</el-button>
      <el-button type="primary" @click="resubmit">重新提交</el-button>
    </template>
  </el-drawer>
</template>

<script setup lang="ts">
import { ref, defineEmits } from "vue";
import FileImage from "@/components/ZcFile/image.vue";

const emit = defineEmits(["resubmit"]);

const drawerVisible = ref(false);
const drawerProps = ref({
  id: 0
});
const params = ref({});

// 接收父组件传过来的参数
const acceptParams = params => {
  drawerProps.value = params;
  drawerVisible.value = true;
};

// 重新提交
const resubmit = () => {
  drawerVisible.value = false;
  emit("resubmit");
};

defineExpose({
  acceptParams
});
</script>
